//
// Created by de on 3/24/21.
//

#ifndef FORCEEIGENTEST_PLAFORMSTATEABSTRACT_H
#define FORCEEIGENTEST_PLAFORMSTATEABSTRACT_H

#include "string"
#include "boost/shared_ptr.hpp"
#include "State/Exception/PlaformTException.h"
#include "State/StateSelection/StateSelection.h"
#include "thread"

enum E_State{
    Normal ,
    Warnning,
    Error,
    InVaild,
};

enum StateStatus{
    InitState ,
    PrepareState ,
    RunningState,
    ErrorState ,
    StopState ,
};





class PlaformStateAbstract {
public:
    virtual E_State init()=0;
    virtual E_State prepare()=0;
    virtual E_State start() = 0;
    virtual E_State reset() = 0;
    virtual E_State stop() = 0;
    virtual StateStatus getCurrentState() = 0;


    virtual E_State wait();

    virtual bool  clearWarn();

protected:
    void setWorkReult(std::shared_ptr<WorkResult> &p_workResult);
protected:
    StateSelection* p_StateSelection;
    StateStatus state;
    static  RosHandler *node;

};


#endif //FORCEEIGENTEST_PLAFORMSTATEABSTRACT_H
